#include "wuPiano.h"

wuPiano::wuPiano()
{
}

wuPiano::~wuPiano()
{
}

void wuPiano::setBgSkin(ofImage *_skin, ofRectangle _rect)
{
	wuBaseControl::setBgSkin(_skin, _rect);

	for(int i=0; i<8; i++)
	{
		ofRectangle rect_tmp;
		rect_tmp = _rect;
		rect_tmp.x = _rect.x + i*(_rect.width/8);
		rect_tmp.width = _rect.width/8;
		teclas[i].setRect(rect_tmp);
	}
	cout << "_piano captured";
}

void wuPiano::draw(bool bCambiazo)
{
	wuBaseControl::draw();
	for(int i=0; i<8; i++)
		teclas[i].draw(bCambiazo);
}

void wuPiano::touch(vector <ofPoint> * _fingerList)
{
	for(int i=0; i<8; i++)
		teclas[i].touch(_fingerList);
}

